<?php
function Sleeper($mSec) {
	if (!function_exists('socket_create')) {
		die("Please enable extension php_sockets.dll");
	}
	static $socket = FALSE;
	if ($socket === FALSE) {
		$socket = array(
			socket_create(AF_INET, SOCK_RAW, 0)
		);
	}
	$pSock = $socket;
	$uSex = $mSec * 1000;
	$read = $write = array();
	$tSex = 0;
	socket_select($read, $write, $pSock, $tSex, $uSex);
	return TRUE;
}
$con = mysql_connect('127.0.0.1', 'root', '');
$db = mysql_selectdb('proc', $con);
$r=mysql_query(sprintf("update cmd set state=2,result='%s' where id='%s'",10,1));
Sleeper(10000);
?>